#include "GameFramework/GameEngine.h"
#include "DX12Renderer/DX12Renderer.h"

FMainEngineLoop::FMainEngineLoop(HWND InWindow)
{
	Scene = new FScene();
	InitialSceneContent();

	Renderer = CreateRenderer(InWindow);
}

FMainEngineLoop::~FMainEngineLoop()
{
	delete Renderer;
	delete Scene;
}

void FMainEngineLoop::Tick()
{
	Renderer->Render(Scene);

	Sleep(30);
}

IRenderer* FMainEngineLoop::CreateRenderer(HWND InWindow)
{
	//return new NullRenderer();
	return new FDX12Renderer(InWindow);
}

void FMainEngineLoop::InitialSceneContent()
{

}
